package com.xgk.boot.module.core.dal.entity.bil;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xgk.boot.framework.mybatis.core.dataobject.BaseDO;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 客户业务帐单表
 * </p>
 *
 * @author yfbao
 * @since 2025-06-14
 */
@Data
@TableName("bil_business_bill")
public class BilBusinessBillDO extends BaseDO {

    /**
     * 主键
     */
    @TableId(value = "bbb_id", type = IdType.ASSIGN_ID)
    private Long bbbId;

    /**
     * 客户代码
     */
    @TableField("customer_code")
    private String customerCode;

    /**
     * 账单状态
     * 0:作废 1:草稿 2:已审核
     */
    @TableField("bbb_status")
    private Integer bbbStatus;

    /**
     * 账单号
     * 格式为财务归属+4位年+2位月+4位账单序号
     */
    @TableField("bbb_code")
    private String bbbCode;

    /**
     * 本位币金额
     */
    @TableField("bbb_amount")
    private BigDecimal bbbAmount;

    /**
     * 币种
     */
    @TableField("currency_code")
    private String currencyCode;

    /**
     * 帐期开始日期
     */
    @TableField("bbb_start_bill_date")
    private Date bbbStartBillDate;

    /**
     * 账单日期(费用截止时间)
     */
    @TableField("bbb_end_bill_date")
    private Date bbbEndBillDate;

    /**
     * 核销标志
     * n:未核销 p:核销中(部分已核销) y:已核销
     */
    @TableField("bbb_writeoff_sign")
    private String bbbWriteoffSign;

    /**
     * 系统备注
     */
    @TableField("bbb_system_note")
    private String bbbSystemNote;

    /**
     * 备注
     */
    @TableField("bbb_note")
    private String bbbNote;

    /**
     * 创建人ID
     */
    @TableField("bbb_creator_id")
    private Integer bbbCreatorId;

    /**
     * 建立类型
     * 0:人工 1:系统
     */
    @TableField("bbb_create_type")
    private Integer bbbCreateType;

    /**
     * 添加时间
     */
    @TableField("bbb_add_time")
    private Date bbbAddTime;

    /**
     * 审核/审批退回标记
     * y:被退回
     */
    @TableField("bbb_review_sign")
    private String bbbReviewSign;

    /**
     * 作废人ID
     */
    @TableField("bbb_delete_id")
    private Integer bbbDeleteId;

    /**
     * 确认人ID
     */
    @TableField("bbb_confirm_id")
    private Integer bbbConfirmId;

    /**
     * 审核人ID
     */
    @TableField("bbb_verifier_id")
    private Integer bbbVerifierId;

    /**
     * 完结人ID
     */
    @TableField("bbb_finish_user")
    private Integer bbbFinishUser;

    /**
     * 作废时间
     */
    @TableField("bbb_delete_time")
    private Date bbbDeleteTime;

    /**
     * 确认时间
     */
    @TableField("bbb_confirm_time")
    private Date bbbConfirmTime;

    /**
     * 审核时间
     */
    @TableField("bbb_verify_time")
    private Date bbbVerifyTime;

    /**
     * 完结时间
     */
    @TableField("bbb_finish_time")
    private Date bbbFinishTime;

    /**
     * 修改时间
     */
    @TableField("bbb_update_time")
    private Date bbbUpdateTime;

    /**
     * 附件URL
     */
    @TableField("bbb_attr_url")
    private String bbbAttrUrl;


    @Override
    public String toString() {
        return "BilBusinessBill{" +
        ", bbbId = " + bbbId +
        ", customerCode = " + customerCode +
        ", bbbStatus = " + bbbStatus +
        ", bbbCode = " + bbbCode +
        ", bbbAmount = " + bbbAmount +
        ", currencyCode = " + currencyCode +
        ", bbbStartBillDate = " + bbbStartBillDate +
        ", bbbEndBillDate = " + bbbEndBillDate +
        ", bbbWriteoffSign = " + bbbWriteoffSign +
        ", bbbSystemNote = " + bbbSystemNote +
        ", bbbNote = " + bbbNote +
        ", bbbCreatorId = " + bbbCreatorId +
        ", bbbCreateType = " + bbbCreateType +
        ", bbbAddTime = " + bbbAddTime +
        ", bbbReviewSign = " + bbbReviewSign +
        ", bbbDeleteId = " + bbbDeleteId +
        ", bbbConfirmId = " + bbbConfirmId +
        ", bbbVerifierId = " + bbbVerifierId +
        ", bbbFinishUser = " + bbbFinishUser +
        ", bbbDeleteTime = " + bbbDeleteTime +
        ", bbbConfirmTime = " + bbbConfirmTime +
        ", bbbVerifyTime = " + bbbVerifyTime +
        ", bbbFinishTime = " + bbbFinishTime +
        ", bbbUpdateTime = " + bbbUpdateTime +
        ", bbbAttrUrl = " + bbbAttrUrl +
        "}";
    }
}
